package com.pine.common.beans.response;

import com.pine.common.util.tree.TreeInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 下拉树形响应体
 * </p>
 *
 * @author pine manage
 * @since 2024-08-16
 */
@Data
@Schema(title = "DropDownTreeResponse", description = "下拉树形响应体")
public class DropDownTreeResponse<ID> implements TreeInfo<ID> {

    @Schema(title = "value", description = "下拉选项值")
    private ID value;

    @Schema(title = "label", description = "下拉选项标签名")
    private String label;

    @Schema(title = "parentId", description = "父节点id")
    private ID parentId;

    @Schema(title = "weight", description = "排序")
    private Comparable<?> weight;


    @Override
    public ID getId() {
        return value;
    }

    @Override
    public CharSequence getName() {
        return label;
    }
}
